package com.fengye.feign.clients;


import com.fengye.feign.api.UploadMata;
import com.fengye.feign.config.FeignMultipartConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value = "feign-provider", configuration = FeignMultipartConfig.class)
public interface FeignProviderClient {

    @PostMapping(value = "/provider/upload", consumes = "multipart/form-data")
    String upload(@RequestPart(value = "file") MultipartFile file,@RequestParam(value = "meta") String meta);

    @GetMapping("/provider/test/{name}")
    String test(@PathVariable(value = "name") String name);
}
